<?php
    @include_once("common.php");
    $phone=$_POST["phone"];
    if(!$phone){
        argErr();
    }
    $search = "select * from `userlist` where phone='$phone'";
    $result = mysqli_query($conn,$search);
    $item=mysqli_fetch_assoc($result);
    $obj=array();
    if(!$item){
        $obj["status"]=true;
        $obj["detail"]="手机号码可以注册";
    }else{
        $obj["status"]=false;
        $obj["detail"]="手机号码已注册";
    }
    echo json_encode($obj);
?>